﻿<%@ Page Title="RSS Feed for Cars" Language="vb" ContentType="text/xml" AutoEventWireup="false"
    CodeBehind="RSS.aspx.vb" Inherits="VW_Passat_Community.RSS" %>

<%@ Import Namespace="System.Data" %>
<asp:sqldatasource id="SqlDataSource1" runat="server" connectionstring="<%$ ConnectionStrings:ConnectionString %>"
    providername="<%$ ConnectionStrings:ConnectionString.ProviderName %>" selectcommand="SELECT [CarID], [CarModel], [CarType], [CarColour], [CarYear], [CarFuel], [CarTransmission] FROM [Cars]">
</asp:sqldatasource>
<asp:repeater id="rptRSS" runat="server" datasourceid="SqlDataSource1">
  <HeaderTemplate>
    <rss version="2.0">
      <channel>
        <title>Latest Cars added </title>
        <description>Volkswagen Passat Community</description>
  </HeaderTemplate>
  <ItemTemplate>
        <item>
          <title><%# FormatForXML(DataBinder.Eval(Container.DataItem, "CarModel"))%></title>
          <description><%# FormatForXML(DataBinder.Eval(Container.DataItem, "CarType"))%></description>
          <link> Details.aspx?D=<%# FormatForXML(DataBinder.Eval(Container.DataItem, "CarID"))%></link>
          <author><%# FormatForXML(DataBinder.Eval(Container.DataItem, "CarColour"))%></author>
          <pubDate><%# FormatForXML(DataBinder.Eval(Container.DataItem, "CarTransmission"))%></pubDate>
        </item>
  </ItemTemplate>
  <FooterTemplate>
      </channel>
    </rss>  
  </FooterTemplate>
</asp:repeater>
